<?php
require_once('../lib/standard.php');
set_pineza();
check_login();

if ((!perastike('note')) || (!$_REQUEST['note'])) telos('no note passed');
else $note = $_REQUEST['note'];

if (perastike('size')) $size = ", `size` = '{$_REQUEST['size']}'";
else $size = '';

if (perastike('width')) $width = $_REQUEST['width'];
else $width = 'NULL';

if (perastike('height')) $height = $_REQUEST['height'];
else $height = 'NULL';

$query = "UPDATE `note` SET `width` = {$width}, " .
	"`height` = {$height}${size}" .
	" WHERE `key` = " . escape($note) .
	" AND `user` = '" . escape($pineza->login) . "'" .
	" LIMIT 1";
mysqli_query($pineza->db, $query);

$pineza->close_database();
print AJAX_SEP;
?>
